package com.kong.multids.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.kong.multids.domain.Animal;
import com.kong.multids.mapper.CatMapper;
import com.kong.multids.mapper.DogMapper;
import com.kong.multids.model.Cat;
import com.kong.multids.model.CatExample;
import com.kong.multids.model.Dog;
import com.kong.multids.model.DogExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author gedachao
 * @description 测试是否可以在一个service中使用两个数据源
 * @date 2020/5/30 16:27
 */
@Service
public class Service4Impl {

    @Autowired
    Service2Impl service2;
    @Autowired
    Service3Impl service3;



    public Animal getAll(){
        Animal animal = new Animal();
        animal.setCats(service2.getCats());
        animal.setDogs(service3.getDogs());
        return animal;
    }


}
